<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑栏目</title>
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/easyui/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/easyui/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/cms.css" />
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript">
		var init = {"name": '${columnVO.name}',
					'url':'${columnVO.url}',
					'type':'${columnVO.type}',
					'remark':'${columnVO.remark}',
					'pid':'${columnVO.pid}',
					'id':'${columnVO.id}'};	
		
		$(function(){
			$('#fm').form('load',init);
		});
	
		function submitForm(){
			
			$('#fm').form('submit', {
				url: "<%=request.getContextPath() %>/column/saveColumn.do",
				onSubmit: function(){
					return $(this).form('validate');
				},
				success: function(msg){
					if("success" == msg){
			        	parent.reloadDg();
			        } else {
			        	$.messager.alert('Warning','<br />' + msg);
			        }
				}
			});
	
		}
	</script>
</head>
<body class="easyui-layout">
	<div data-options="region:'center',border:false">
		<form id="fm" method="post">
			<input type="hidden" name="id"/>
			<input type="hidden" name="pid"/>
			<input type="hidden" name="type" />
			<div>
				<table>
					<tr>
						<td class="fm_title"><font color="red">*&nbsp;</font>名称</td>
						<td><input type='text' name="name" class='easyui-validatebox in-text ' 
								data-options="required:true" /></td>
					</tr>
					<tr>
						<td class="fm_title"><font color="red">*&nbsp;</font>链接</td>
						<td><input type='text' name="url" class='easyui-validatebox in-text ' 
								data-options="required:true" /></td>
					</tr>
					<tr>
						<td class="fm_title" valign="top">备注</td>
						<td><textarea style="width: 200px;height: 80px;font-size: 12px" name="remark"></textarea> </td>
					</tr>
				</table>
			</div>
		</form>
	</div>
	<div data-options="region:'south',border:false" class="fm-btn">
		<a href="javascript:submitForm()" class="easyui-linkbutton" iconCls="icon-ok">确定</a>
		<a href="javascript:parent.closeWin()" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
	</div>
</body>
</html>